package cn.getech.data.development.model.req.confconnect;

import cn.getech.data.intelligence.common.validator.group.AddGroup;
import cn.getech.data.intelligence.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@ApiModel(description = "表和字段信息")
@Data
public class TableInfoFieldRelationReq {
    @ApiModelProperty(value = "数据源id")
    @NotNull(message = "数据源不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Integer sourceId;

    @ApiModelProperty(value = "数据库")
    @NotBlank(message = "数据库不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String dbName;

    @ApiModelProperty(value = "表名称")
    @NotBlank(message = "表名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String tableName;

    @ApiModelProperty(value = "collection_table_info表id")
    private Integer collTableId;

    private Integer tableType;

    private Integer storeEngine;
}
